package com.shanzhu.tourism.mapper;

import com.shanzhu.tourism.domain.ProductOrder;
import com.shanzhu.tourism.domain.ProductOrderItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: cc
 * @Date: 2025/03/28/15:05
 **/
@Mapper
public interface ProductOrderMapper {
    int insert(ProductOrder order);
    int insertOrderItems(@Param("items") List<ProductOrderItem> items);
    ProductOrder selectById(Long orderId);
    List<ProductOrder> selectByUserId(Long userId);
    int updateStatus(@Param("orderId") Long orderId, @Param("status") Integer status);
    List<ProductOrderItem> selectOrderItems(Long orderId);
}
